<template>
  <section>
    <span>个人中心</span>
    <p>内容：{{content}}</p>
    <p>内容：{{publicContent}}</p>
  </section>
</template>

<script>
export default {
  name: 'PersonPage',
  // middleware: 'userAuth'
  middleware: 'userAuth',
  data() {
    return {
      content: '',
      publicContent: ''
    }
  },
  async mounted() {
    try {
      const res = await this.$axios.$get('/test/user')
      const res1 = await this.$axios.$get('/test/all')
      this.content = res
      this.publicContent = res1
    } catch (error) {
      this.$message.error('错了哦，这是一条错误消息');
    }
  }
}
</script>
